import java.util.*;

public class Solution {

    public static boolean isSubsequence (String S, String T) {
        char[] arrs = S.toCharArray();
        char[] arrt = T.toCharArray();
        int i = 1;
        int j = 1;
        while(i < arrs.length && j < arrt.length){
            while (arrs[i-1] == arrt[j-1] && i < arrs.length && j < arrt.length){
                i++;
                j++;
            }
            j++;
        }
        return i > arrs.length;
    }

    public static void main(String[] args) {
        String S = "nower";
        String T = "nowcoder";
        System.out.println(isSubsequence(S,T));
        Scanner scanner = new Scanner(System.in);
    }
}